package com.zz.ecommerce.togatherDeclareMgr.custDeclarationUpload.service;

import com.zz.ecommerce.togatherDeclareMgr.custDeclarationUpload.dao.GoodsModelDao;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * <一句话功能描述>
 * <功能详细描述>
 *
 * @author STEVEN
 * @date 2015/10/22,17:49
 */
@Service
public class GoodsModelService {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private GoodsModelDao goodsModelDao;

    public List<String> getModelByHscode(String hsCodeZ,String codeSC) {
        String model = goodsModelDao.getModelByHscode(hsCodeZ,codeSC);
        return StringUtils.isEmpty(model) ? null : Arrays.asList(model.split(";"));
    }
}
